package com.itgaoshu.controller;

import com.itgaoshu.bean.Skull;
import com.itgaoshu.bean.Upplier;
import com.itgaoshu.bean.Warehuose;
import com.itgaoshu.service.DrugStoreService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * \* @author: 李豪杰
 * \* Date: 2021/3/19
 * \* Time: 20:16
 * \* Description:
 * \
 */
@Controller
@RequestMapping("dsnavigation")
public class PharmacyPathController {//药房详情
    @Resource
    private DrugStoreService sswu;
    @RequestMapping("pharymacyhtml")
    public String selectAllPharmacy() {
        return "drugstore/c_pharmacy";
    }

    @RequestMapping("beputinstorage")
    //入库单../dsnavigation/beputinstorage
    public String beputinstorage(Upplier upplier, Warehuose warehuose, Skull skull, Model model) {
        //查询供货商，经办人，库房
        List<Upplier> selupp = sswu.selupplier(upplier);
        List<Skull> selsku = sswu.selskull(skull);
        List<Warehuose> selwar = sswu.selwarehuose(warehuose);
        model.addAttribute("selupp",selupp);
        model.addAttribute("selsku",selsku);
        model.addAttribute("selwar",selwar);
        return "drugstore/c_beputinstorage";
    }
    @RequestMapping("selectdurg")
    //库存查询../dsnavigation/selectdurg
    public String selectdurg() {
        return "drugstore/c_selectDrug";
    }
    @RequestMapping("selectchuku")
    //出库
    public String selectchuku() {
        return "drugstore/c_gooutstore";
    }
    @RequestMapping("selectless")
    //库存不足../dsnavigation/selectless
    public String selectless() {
        return "drugstore/c_lackdrug";
    }
    @RequestMapping("seldrugDate")
    //过期提醒../dsnavigation/seldrugDate
    public String seldrugDate() {
        return "drugstore/c_storedrugDate";
    }
    @RequestMapping("record")
    //操作记录../dsnavigation/record
    public String record() {
        return "drugstore/c_record";
    }
    @RequestMapping("recycle")
    //药品回收../dsnavigation/recycle
    public String recycle() {
        return "drugstore/c_recycle";
    }

}
